from django.db import models

# Create your models here.
## 创建表
## 下面这个类相当于执行了这个sql

# create table app01_userinfo(
#     id bigint auto_increment primary key,
#     name varchar(32),
#     password varchar(64),
#     age int
# )


class UserInfo(models.Model):
    name = models.CharField(max_length=32)
    password = models.CharField(max_length=64)
    age = models.IntegerField()


# 新建数据 insert
# UserInfo.objects.create(name="1",password="1",age=18)